﻿using System;
using System.Collections.Generic;
using System.Text;

namespace JinianNet.JNCms
{
    public class Fileds
    {
        public class CacheKey
        {

        }

        public static string ConnectionString
        {
            get
            {
                string key = string.Concat("Cache_System_ConnectionString");
                object value = JinianNet.Web.Cache.Create(Web.Cache.CacheMode.Memory).Get(key);
                if (value == null || string.IsNullOrEmpty(value.ToString()))
                {
                    value = System.Configuration.ConfigurationManager.ConnectionStrings["JinianNet.ConnectionString"].ConnectionString;
                    JinianNet.Web.Cache.Create(Web.Cache.CacheMode.Memory)[key] = value;
                }
                return value.ToString();
            }
        }

    }
}
